//
//  RPCCallback.hpp
//  tarsim
//
//  Created by lanhy on 2022/3/22.
//

#ifndef RPCCallback_hpp
#define RPCCallback_hpp

#include <stdio.h>
#include "gamoosim.h"
#include "baseservant.h"
#include "UserServant.h"


class CommonServantPrxBrokerCallback : public BaseServantPrxCallback
{
public:
    ClientContext _context;
    gamoosim::ABCPack _req;
    tars::TarsCurrentPtr _current;
public:
    CommonServantPrxBrokerCallback(tars::TarsCurrentPtr current, ClientContext context, gamoosim::ABCPack req);
    
    virtual void callback_request(tars::Int32 ret, const gamoosim::ABCPack &resp);
    
    virtual void callback_request_exception(tars::Int32 ret);
};


class UserServantPrxBrokerCallback : public UserServantPrxCallback
{
public:
    ClientContext _context;
    gamoosim::LoginReq _req;
    tars::TarsCurrentPtr _current;
public:
    UserServantPrxBrokerCallback(tars::TarsCurrentPtr current, ClientContext context, gamoosim::LoginReq req);
    
    virtual void callback_auth(tars::Int32 ret, const std::string &resp);
    
    virtual void callback_auth_exception(tars::Int32 ret);
};


#endif /* RPCCallback_hpp */
